* Load data for policy effect of mass shootings analysis

use "data/data.dta", clear

// years to use for analyses
loc rng "if inrange(year, 1990, 2014)"
loc yfe "i.year"

// demographic and institutional controls
loc gov "i.had_reg_session i.biennium"
loc demo "elder_pct under25_pct black_pct hisp_pct unemp inc"
loc demo "`demo' highschool veteran divorced"

// political variables
loc politics "demleg repleg repgov"

// primary independent variables
loc shoot "shoot"
loc fatal "fatal"
loc adjshoot "adjshoot"
loc adjfatal "adjfatal"
loc murder "gun_murder_rate"

// dependent variables
loc billdv "bills"
loc lawdv  "laws"

// take mass shooting fatalities per 100,000 out of murder rate
replace `murder' = `murder' - pc_`fatal'

// poisson and linear regression options and control variables
loc opt = "fe vce(robust)"
loc linopt = "absorb(fips) vce(cluster fips)"
loc controls = "`politics' `gov' `demo' `yfe'"

qui adopath + "bill-analysis"
loc out "output/pub"

cap mkdir "output"
cap mkdir "`out'"
exit
